package pers.dzk.fivelnarow.player.people;

import pers.dzk.fivelnarow.piece.Piece;
import pers.dzk.fivelnarow.player.Player;
import java.awt.*;
import java.io.Serializable;
import java.util.List;

/**
 * @author 丁泽凯
 * 机器人类
 */
public abstract class PeoplePlayer extends Player implements Serializable {

    public PeoplePlayer(List<Piece> pieces, boolean order) {
        super(pieces, order);
    }
    public Piece play(Point point){
        int index = getPieceList().size()-1;
        Piece piece = getPieceList().get(index);
        getPieceList().remove(index);
        piece.setPoint(point);
        System.out.println(getName()+"的剩余棋子:"+ getPieceList().size());
        return piece;
    }
    public PeoplePlayer(){

    }
}
